/**
 * 	<div style='width: 400px; height: 500px;float: left;border: dashed' >
		<img  src='../img/${cai.pdz }' width='400px' height='250px' align='center'/>	
		<h2 align='center'>菜名:${cai.pname }</h2>
		<h3 align='center'>类型:${cai.ftype }</h3>
		<h3 align='center'>价格:${cai.pprice }元</h3>
		<h3 align='center'><button><a href='caidan/${zzs.tid }'>购买</a></button></h3>


		</div>
				<script type='text/javascript'>
	$(function(){
		$('#goumaibtt2').click(function(){
			alert('xxx')
			var pid=$('#goumaibtt2').val();
			alert(tid);
			alert(pid);
			$.ajax({
				type:'post',
				url:'../caidan',
				data:{'tid':tid,'pid':pid},
				dataType:'json',
				
				success:function(data){
					
					var str='';
					$.each(data,function(i,item){
						
						str +='<h2 align='center'>菜名:'+item.pname+'</h2>';
						str +='<h3 align='center'>价格:'+item.pprice +'元</h3>';
				
					});
					
					$('#dingdang').html(str);
				
				}
			});
			
		});
	})
	
		</script>
 */

$(function(){
	
	var ftype=$("#re").val();
	var leng=$("#leng").val();
	var zhu=$("#zhu").val();
	var tang=$("#tang").val();
	var ying=$("#ying").val();
	var tid=$("#tid").val();
	$("#re").click(function(){

		$.ajax({
			type:"post",
			url:"../tiaojian",
			data:{"ftype":ftype},
			dataType:"json",
			
			success:function(data){
				
				var str="";
				$.each(data,function(i,item){
					str +="<div style='width: 400px; height: 500px;float: left;border: dashed' >";
					str +="<img  src='../img/"+item.pdz+"' width='400px' height='250px' align='center'/>";
					str +="<h2 align='center'>菜名:"+item.pname+"</h2>";
					str +="<h3 align='center'>类型:"+item.ftype +"</h3>";
					str +="<h3 align='center'>价格:"+item.pprice +"元</h3>";
					str +="<h3 align='center'><button id='goumaibtt"+item.pid+"' value='"+item.pid+"'>购买</button></h3>";
					str +="</div>"
			
					
				});
				
				$("#cai").html(str);
				$("#goumaibtt2").click(function(){
					var pid=$("#goumaibtt2").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
						
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt1").click(function(){
					var pid=$("#goumaibtt1").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="1";
							var zprice=0;
							
							 
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt3").click(function(){
					var pid=$("#goumaibtt3").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							 
							
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				
				$("#goumaibtt4").click(function(){
					var pid=$("#goumaibtt4").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							
							$.each(data,function(i,item){
								zprice +=item.pprice;s
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt5").click(function(){
					var pid=$("#goumaibtt5").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							 
							
							
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt6").click(function(){
					var pid=$("#goumaibtt6").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							 
							
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt7").click(function(){
					var pid=$("#goumaibtt7").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							 
							 
							
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt8").click(function(){
					var pid=$("#goumaibtt8").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt9").click(function(){
					var pid=$("#goumaibtt9").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});	
				$("#goumaibtt10").click(function(){
					var pid=$("#goumaibtt10").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
			
				
			
			}
			
		
			
			
		});
		
	});

	
	
	$("#leng").click(function(){

		$.ajax({
			type:"post",
			url:"../tiaojian",
			data:{"ftype":leng},
			dataType:"json",
			
			success:function(data){
				
				var str="";
				$.each(data,function(i,item){
					str +="<div style='width: 400px; height: 500px;float: left;border: dashed' >";
					str +="<img  src='../img/"+item.pdz+"' width='400px' height='250px' align='center'/>";
					str +="<h2 align='center'>菜名:"+item.pname+"</h2>";
					str +="<h3 align='center'>类型:"+item.ftype +"</h3>";
					str +="<h3 align='center'>价格:"+item.pprice +"元</h3>";
					str +="<h3 align='center'><button id='goumaibtt"+item.pid+"' value='"+item.pid+"'>购买</button></h3>";
					str +="</div>"
				});
				
				$("#cai").html(str);
				$("#goumaibtt11").click(function(){
					var pid=$("#goumaibtt11").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							 
							 
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt12").click(function(){
					var pid=$("#goumaibtt12").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							 
							 
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt13").click(function(){
					var pid=$("#goumaibtt14").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							
							
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt13").click(function(){
					var pid=$("#goumaibtt14").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							
							 
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				
				$("#goumaibtt14").click(function(){
					var pid=$("#goumaibtt14").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							 
							
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				
				$("#goumaibtt15").click(function(){
					var pid=$("#goumaibtt15").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				
				
				$("#goumaibtt16").click(function(){
					var pid=$("#goumaibtt16").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							 
							
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				
				$("#goumaibtt17").click(function(){
					var pid=$("#goumaibtt17").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							
							 
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				
				
				$("#goumaibtt18").click(function(){
					var pid=$("#goumaibtt18").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				
				
				$("#goumaibtt19").click(function(){
					var pid=$("#goumaibtt19").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							 
							
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				
				
				$("#goumaibtt20").click(function(){
					var pid=$("#goumaibtt20").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var zprice=0;
							 
							
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
			}
			
		});
		
		
	});
	$("#zhu").click(function(){

		$.ajax({
			type:"post",
			url:"../tiaojian",
			data:{"ftype":zhu},
			dataType:"json",
			
			success:function(data){
				
				var str="";
				$.each(data,function(i,item){
					str +="<div style='width: 400px; height: 500px;float: left;border: dashed' >";
					str +="<img  src='../img/"+item.pdz+"' width='400px' height='250px' align='center'/>";
					str +="<h2 align='center'>菜名:"+item.pname+"</h2>";
					str +="<h3 align='center'>类型:"+item.ftype +"</h3>";
					str +="<h3 align='center'>价格:"+item.pprice +"元</h3>";
					str +="<h3 align='center'><button id='goumaibtt"+item.pid+"'value='"+item.pid+"'>购买</button></h3>";
					str +="</div>"
				});
				
				$("#cai").html(str);
				$("#goumaibtt27").click(function(){
					var pid=$("#goumaibtt27").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt28").click(function(){
					var pid=$("#goumaibtt28").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							 
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt29").click(function(){
					var pid=$("#goumaibtt29").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							 
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt30").click(function(){
					var pid=$("#goumaibtt30").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							 
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
			
			}
		});
		
	});
	
	
	
	
	$("#tang").click(function(){

		$.ajax({
			type:"post",
			url:"../tiaojian",
			data:{"ftype":tang},
			dataType:"json",
			
			success:function(data){
				
				var str="";
				$.each(data,function(i,item){
					str +="<div style='width: 400px; height: 500px;float: left;border: dashed' >";
					str +="<img  src='../img/"+item.pdz+"' width='400px' height='250px' align='center'/>";
					str +="<h2 align='center'>菜名:"+item.pname+"</h2>";
					str +="<h3 align='center'>类型:"+item.ftype +"</h3>";
					str +="<h3 align='center'>价格:"+item.pprice +"元</h3>";
					str +="<h3 align='center'><button id='goumaibtt"+item.pid+"' value='"+item.pid+"'>购买</button></h3>";
					str +="</div>"
				});
				
				$("#cai").html(str);
				$("#goumaibtt21").click(function(){
					var pid=$("#goumaibtt21").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							 
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				
				$("#goumaibtt22").click(function(){
					var pid=$("#goumaibtt22").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
			
				$("#goumaibtt23").click(function(){
					var pid=$("#goumaibtt23").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							 
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
			
				$("#goumaibtt24").click(function(){
					var pid=$("#goumaibtt24").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
			
				$("#goumaibtt25").click(function(){
					var pid=$("#goumaibtt25").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							 
							$.each(data,function(i,item){
								zprice +=item.pprice;
								str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
								
								
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt26").click(function(){
					var pid=$("#goumaibtt26").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
			
			
			
			}
		});
		
	});
	
	
	$("#ying").click(function(){

		$.ajax({
			type:"post",
			url:"../tiaojian",
			data:{"ftype":ying},
			dataType:"json",
			
			success:function(data){
				
				var str="";
				$.each(data,function(i,item){
					str +="<div style='width: 400px; height: 500px;float: left;border: dashed' >";
					str +="<img  src='../img/"+item.pdz+"' width='400px' height='250px' align='center'/>";
					str +="<h2 align='center'>菜名:"+item.pname+"</h2>";
					str +="<h3 align='center'>类型:"+item.ftype +"</h3>";
					str +="<h3 align='center'>价格:"+item.pprice +"元</h3>";
					str +="<h3 align='center'><button id='goumaibtt"+item.pid+"' value='"+item.pid+"'>购买</button></h3>";
					str +="</div>"
				});
				
				$("#cai").html(str);
				
				$("#goumaibtt31").click(function(){
					var pid=$("#goumaibtt31").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							 
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
			
				$("#goumaibtt32").click(function(){
					var pid=$("#goumaibtt32").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							 
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
			
				$("#goumaibtt33").click(function(){
					var pid=$("#goumaibtt33").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
			
				$("#goumaibtt34").click(function(){
					var pid=$("#goumaibtt34").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				$("#goumaibtt35").click(function(){
					var pid=$("#goumaibtt35").val();
					$.ajax({
						type:"post",
						url:"../caidan",
						data:{"tid":tid,"pid":pid},
						dataType:"json",
						
						success:function(data){
							
							var str1="";
							var str1="";
							var zprice=0;
							
							$.each(data,function(i,item){
								 zprice +=item.pprice;
								 str1 +="<h4 align='center'>"+item.pname+"&nbsp;"+item.pprice+"元</h4>";
									
									
							});
							 str1 +="<h2 align='center'style='color: deeppink;'>总价:"+zprice+"元</h2>";
							 str1 +="<h2 align='center'><button><a href='../tijiao/"+zprice+"/"+tid+"'>提交</a></button><h2/>"
							$("#dingdang").html(str1);
						
						}
					});
					
				});
				
			
			
			}
		});
		
	});
	
	
	
	
	
});